package org.feng.test;

import org.feng.clog.utils.ResultUtil;
import org.feng.clog.vo.ResultVo;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * 控制器
 *
 * @author feng
 */
@RestController
@RequestMapping("order")
public class OrderController {

    @Resource
    private OrderManager orderManager;

    // @WithoutLogin
    @PostMapping("/test1")
    public ResultVo<String> test1(@RequestBody OrderCreateReq req) {
        // 创建
        Boolean started = orderManager.createOrder(req);

        return ResultUtil.success("success " + started);
    }
}
